<template>
	<!-- pages/member/index.wxml -->
	<view :class="{'pageBox':true, 'wxmini':platForm == 'mp-weixin'}"  @touchmove="touchStartMove" @touchend="touchEndMove">
		<!-- 头部 -->
		<view :class="'fixedTop ' + (topShow ? 'show' : '') + ' ' + (slideHide ? 'fadeOut' : '')"
			:style="'padding-top:' + navTop + 'px; background-color:' + pageSet.style.background + '; '">
			<!-- margin-right: {{(paddingRight + 10)}}px -->
			<view class="top_header" :style="getStyle('pageTop', '', pageSet) + ';margin-top:' + offTop + 'px;  '"
				v-if="fixshow">
				<view :class="'flex_l ' + (pageSet.layout === 1 ? 'flexCenter' : '')">
					<!-- :url=" userinfo ? memberComp.headLink && !hasIn(memberComp.headLink, profileUrl) ? encodeUrl(memberComp.headLink) : '/pages/member/profile/index' : loginUrl -->
					<view hover-class="none" v-if="!pageSet.showType" :url=" userinfo ? memberComp.headLink && !hasIn(memberComp.headLink, profileUrl) ? encodeUrl(memberComp.headLink) : '/pages/member/profile/index' : loginUrl
                        " class="infoBox a" @click="goLink(memberComp.headLink && !hasIn(memberComp.headLink, profileUrl) ? encodeUrl(memberComp.headLink) : '/pages/member/profile/index',1)" open-type="navigate">
						<view class="photo">
							<image
								:src="userinfo && userinfo.photo ? userinfo.photo : masterDomain + '/static/images/noPhoto_100.jpg'"
								@error="imgloadErr" :lazy-load="true"
								:data-errImg="masterDomain + '/static/images/noPhoto_100.jpg'" mode="aspectFill"
								data-type="userinfo" data-prop="photo"></image>
						</view>
						<view class="h4" :style="'color:' + pageSet.style.color + ';'">
							{{ userinfo.nickname ? userinfo.nickname : '登录/注册' }}
						</view>
					</view>
					<view class="infoBox" v-else>
						<view class="h4" :style="'color:' + pageSet.style.color + ';'">
							{{ pageSet.title ? pageSet.title : '会员中心' }}
						</view>
					</view>
				</view>
				<view class="flex_r">
					<view class="btns" v-if="pageSet.showType == 2&&pageSet.btns">
						<view v-for="(btn,index) in pageSet.btns.list" :key="index">
							<view @click="toLink(btn)" :url="btn.link" hover-class="none" class="icon">
								<image mode="aspectFill" :style="getStyle('pageBtn','',pageSet)" :src="btn.icon ? btn.icon : defaultIcon2 " alt=""></image>
							</view>
						</view>
					</view>
					<view class="btns" v-else-if="pageSet.showType !== 1&&memberComp.setBtns">
						<view v-for="(btn,index) in memberComp.setBtns.btns" :key="index">
							<view :url="btn.link" hover-class="none" class="icon" @click="toLink(btn)">
								<image  mode="aspectFill"  :style="getStyle('pageBtn','',pageSet)" :src="btn.icon ? btn.icon : defaultIcon2 " alt=""></image>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="placeholdeTop" v-if="(platForm == 'mp-toutiao' || platForm == 'web' ) && pageSet.h5FixedTop && pageSet.showHeader && memberComp.theme != 3"
				:style="memberComp.theme==3 && fixshow ?'height: 24rpx;background-color:':''+`padding-top:${navTop}px`">
				<view :class="'headerTop placeTop ' + (memberComp.themeType == 'light' ? 'lightStyle' : '')" :style="
                        'background-color:'+ pageSet.style.bgImgColor +';margin-top:' +
                        (offTop + biasTop)+
                        'px;top:' +
                        navTop +
                        'px; ' +
                        ('padding:0rpx ' + (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0))+';'+paddRight
                    " v-if="memberComp && memberComp.theme != 3 && memberComp.setBtns.btns">
					<block v-if="globalData.appConfig.cfg_business_state">
						<view class="left_top a" :url="userinfo ? encodeUrl(memberComp.branch.link) : loginUrl" @click="toLink(memberComp.branch,1)" v-if="userinfo && userinfo.busiType != 2 && userinfo.is_staff == 1 && memberComp.branchShow">
							<view class="icon s">
								<svg class="em" width="30rpx" height="30rpx"
									v-if="memberComp.themeType == 'light' && hasIn(memberComp.branch.icon, masterDomain + '/static/images/admin/')"
									src="/static/svg/member/icon01.svg" color="#fff" alt=""></svg>
								<image v-else :src="memberComp.branch.icon"></image>
							</view>
							<view class="span">{{ memberComp.branch.text }}</view>
						</view>
						<view hover-class="none" :url="userinfo ? encodeUrl(memberComp.business.link) : loginUrl"
							class="left_top a" v-else-if="appConfig.cfg_ios_review === '0'" @click="toLink(memberComp.business)">
							<view class="icon s">
								<svg class="em" width="30rpx" height="30rpx"
									v-if="memberComp.themeType == 'light' && hasIn(memberComp.business.icon, masterDomain + '/static/images/admin/')"
									src="/static/svg/member/icon01.svg" color="#fff" alt=""></svg>
								<image v-else :src="memberComp.business.icon"></image>
							</view>
							<view calss="span">{{ memberComp.business.text }}</view>
						</view>
					</block>

					<!-- 占位 -->
					<view v-else></view>

					<view class="right_top" style="margin-right: 10rpx; flex-shrink: 0;">
						<view class="btns ul">
							<view :class="(memberComp.setBtns.btnType === 2 ? 'floatItem' : '') + ' li'"
								v-for="(btn, index) in memberComp.setBtns.btns" :key="index">
								<view :url="'/pages/redirect/index?url=' + encodeURIComponent(addUrlParam(btn.link))"
									hover-class="none" @click="toLink(btn)">
									<view class="icon"
										v-if="memberComp.themeType == 'light' && hasIn(btn.icon, masterDomain + '/static/images/admin/')">
										<svg class="em" width="44rpx" height="44rpx" color="#fff"
											:src="'/static/svg/member/' + toSvg(btn.icon)"></svg>
									</view>
									<view class="icon" v-else>
										<image :src="(btn.icon ? btn.icon : defaultIcon2) + ' '" alt=""></image>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 会员信息头部 -->
		<view class="memberInfoBox">
			<view class="placeholdeTop"
				:style="memberComp.theme==3&&!fixshow?'height: 24rpx;background-color:':''+`padding-top:${navTop}px`">
				<view :class="'headerTop placeTop ' + (memberComp.themeType == 'light' ? 'lightStyle' : '')" :style="
                        'margin-top:' +
                        (offTop + biasTop)+
                        'px;top:' +
                        navTop +
                        'px; ' +
                        ('padding:0rpx ' + (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0))+';'+paddRight
                    " v-if="memberComp && memberComp.theme != 3 && memberComp.setBtns.btns">
					<block v-if="globalData.appConfig.cfg_business_state">
						<view class="left_top a" :url="userinfo ? encodeUrl(memberComp.branch.link) : loginUrl" @click="toLink(memberComp.branch,1)" v-if="userinfo && userinfo.busiType != 2 && userinfo.is_staff == 1 && memberComp.branchShow">
							<view class="icon s">
								<svg class="em" width="30rpx" height="30rpx"
									v-if="memberComp.themeType == 'light' && hasIn(memberComp.branch.icon, masterDomain + '/static/images/admin/')"
									src="/static/svg/member/icon01.svg" color="#fff" alt=""></svg>
								<image v-else :src="memberComp.branch.icon"></image>
							</view>
							<view class="span">{{ memberComp.branch.text }}</view>
						</view>
						<view hover-class="none" :url="userinfo ? encodeUrl(memberComp.business.link) : loginUrl"
							class="left_top a" v-else-if="appConfig.cfg_ios_review === '0'" @click="toLink(memberComp.business,1)">
							<view class="icon s">
								<svg class="em" width="30rpx" height="30rpx"
									v-if="memberComp.themeType == 'light' && hasIn(memberComp.business.icon, masterDomain + '/static/images/admin/')"
									src="/static/svg/member/icon01.svg" color="#fff" alt=""></svg>
								<image v-else :src="memberComp.business.icon"></image>
							</view>
							<view calss="span">{{ memberComp.business.text }}</view>
						</view>
					</block>

					<!-- 占位 -->
					<view v-else></view>

					<view class="right_top" style="margin-right: 10rpx; flex-shrink: 0;">
						<view class="btns ul">
							<view :class="(memberComp.setBtns.btnType === 2 ? 'floatItem' : '') + ' li'"
								v-for="(btn, index) in memberComp.setBtns.btns" :key="index">
								<view :url="'/pages/redirect/index?url=' + encodeURIComponent(addUrlParam(btn.link))"
									hover-class="none" @click="toLink(btn)">
									<view class="icon"
										v-if="memberComp.themeType == 'light' && hasIn(btn.icon, masterDomain + '/static/images/admin/')">
										<svg class="em" width="44rpx" height="44rpx" color="#fff"
											:src="'/static/svg/member/' + toSvg(btn.icon)"></svg>
									</view>
									<view class="icon" v-else>
										<image :src="(btn.icon ? btn.icon : defaultIcon2) + ' '" alt=""></image>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="memberBg" :style="getStyle('memberBg', '', memberComp)" v-if="memberComp"></view>

			<view
				:class="'memberInfo memberInfo' + memberComp.theme + ' ' + (memberComp.themeType == 'light' ? 'lightStyle' : '') + (globalData.appConfig && globalData.appConfig.cfg_business_state || (memberComp && memberComp.setBtns.btns.length) ? '' : ' lowerMemberInfo')">
				<block v-if="memberComp.theme === 1 || memberComp.theme == 2">
					<view class="memberInfoCon" :style="
                            'margin-left:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                            ';margin-right:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0)
                        ">
						<navigator hover-class="none" class="mleftCon fn-clear a" :url="userinfo? proUrl: loginUrl"
							@click="userinfo?checkLogin():needReload=true" open-type="navigate">
							<view class="photoCon">
								<image
									:src="userinfo && userinfo.photo ? userinfo.photo : masterDomain + '/static/images/noPhoto_100.jpg'"
									@error="imgloadErr" :lazy-load="true"
									:data-errImg="masterDomain + '/static/images/noPhoto_100.jpg'" mode="aspectFill"
									data-type="userinfo" data-prop="photo"></image>
							</view>
							<view class="textCon">
								<view class="h4">{{ userinfo ? userinfo.nickname : '登录/注册' }}</view>
								<view :class="'vipIcon lBox level_' + checkVipLevel(userinfo)" v-if="userinfo">
									<view class="vip_icon s" v-if="checkVipLevel(userinfo)">
										<image :src="userinfo.levelIcon" mode="aspectFill"
											:lazy-load="false" @error="" @load=""></image>
									</view>
									<text
										class="span">{{ checkVipLevel(userinfo) ? userinfo.levelName : '普通会员' }}</text>
								</view>
							</view>
							<view class="arr s" v-if="!memberComp.qiandaoBtn.show">
								<svg class="em" width="20rpx" height="28rpx"
									:color="memberComp.qiandaoBtn.style.arr_color"
									src="/static/svg/member/arr_icon01.svg"></svg>
							</view>
						</navigator>
						<view class="mrightCon" v-if="userinfo && memberComp.qiandaoBtn.show">
							<view hover-class="none" :url="encodeUrl(memberComp.qiandaoBtn.link)" @click="toLink(memberComp.qiandaoBtn)" class="rbtn a"
								:style="
                                    'background:' +
                                    checkBgColor(memberComp.qiandaoBtn.style.background, memberComp.qiandaoBtn.style.opacity) +
                                    '; color:' +
                                    memberComp.qiandaoBtn.style.color +
                                    ';'
                                ">
								<view class="s">
									<image :src="memberComp.qiandaoBtn.icon"></image>
								</view>
								<view class="span">{{ memberComp.qiandaoBtn.text }}</view>
							</view>
						</view>
					</view>

					<!-- 数字区域 -->
					<view class="dataCount" :style="
                            getStyle('numberCountBox', '', memberComp) +
                            '; margin-left:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                            ';margin-right:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                            ';'
                        ">
						<view class="ul" v-if="memberComp.numberCount.showItems.length > 0">
							<block
								v-for="(item, ind) in checkArr(memberComp.numberCount.showItems, numberOption, appConfig.cfg_ios_review)"
								:key="ind">
								<view hover-class="none"
									:url="userinfo ? encodeUrl(item.link, appConfig.cfg_user_index) : loginUrl"
									class="li"
									:style="'width:' + 100 / (memberComp.numberCount.showItems.length >= 4 ? memberComp.numberCount.showItems.length : 4) + '%;'"
									@click="toLink(item)">
									<view class="h4" :style="'color:' + memberComp.numberCount.numberStyle.color + ';'">
										<text v-if="item.id != 6 && item.id != 8">
											{{
                                                userinfo && userinfo[item.code] ? ((item.id === 4 || item.id === 5) && userinfo[item.code] > 999 ? '999+' : userinfo[item.code]) : 0
                                            }}
										</text>
										<text v-else>
											{{ userinfo[item.code] > 999 ? NumberFomart(userinfo[item.code]) : userinfo[item.code] ? userinfo[item.code] : 0 }}
										</text>
									</view>
									<view class="p" :style="'color:' + memberComp.numberCount.titleStyle.color + ';'">
										{{ item.text }}
									</view>
								</view>

								<view class="li line"
									:style="' opacity:.1; background:' + (memberComp.themeType == 'dark' ? memberComp.numberCount.titleStyle.color : '#fff') + ';'"
									v-if="memberComp.numberCount.splitLine && ind <= memberComp.numberCount.showItems.length - 2">
								</view>
							</block>
						</view>
					</view>
				</block>
				<!-- 模板3 -->
				<block v-else-if="memberComp.theme == 3">
					<view class="memberInfoCon" :style="
                            'margin-left:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                            ';margin-right:' +
                            (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                            ';'
                        ">
						<navigator hover-class="none"
							:class="'mleftCon fn-clear ' + (!memberComp.headLink || profileUrl.indexOf(memberComp.headLink) > -1 ? 'toMini' : '')"
							data-module="member" data-temp="profile/index" :url="userinfo? proUrl: loginUrl"
							@click="userinfo?checkLogin():needReload=true" open-type="navigate">
							<view class="photoCon">
								<image
									:src="userinfo && userinfo.photo ? userinfo.photo : masterDomain + '/static/images/noPhoto_100.jpg'"
									@error="imgloadErr" :lazy-load="true"
									:data-errImg="masterDomain + '/static/images/noPhoto_100.jpg'" mode="aspectFill"
									data-type="userinfo" data-prop="photo"></image>
							</view>
							<view class="textCon">
								<view class="h4">{{ userinfo ? userinfo.nickname : '登录/注册' }}</view>
								<view :class="'vipIcon lBox level_' + checkVipLevel(userinfo)" v-if="userinfo">
									<view class="vip_icon s" v-if="checkVipLevel(userinfo)">
										<image :src="userinfo.levelIcon" mode="aspectFill"
											:lazy-load="false" @error="" @load=""></image>
									</view>
									<text
										class="span">{{ checkVipLevel(userinfo) ? userinfo.levelName : '普通会员' }}</text>
								</view>
							</view>
						</navigator>
						<view class="mrightCon right_top" v-if="memberComp.qiandaoBtn.show">
							<view class="btns ul">
								<view :class="(memberComp.setBtns.btnType === 2 ? 'floatItem' : '') + ' li'"
									v-for="(btn, index) in memberComp.setBtns.btns" :key="index">
									<view @click="toLink(btn)" :url="'/pages/redirect/index?url=' + encodeURIComponent(addUrlParam(btn.link))"
										hover-class="none">
										<view class="icon"
											v-if="memberComp.themeType == 'light' && hasIn(btn.icon, masterDomain + '/static/images/admin/')">
											<svg class="em" width="44rpx" height="44rpx" color="#fff"
												:src="'/static/svg/member/' + toSvg(btn.icon ? btn.icon : defaultIcon2)"></svg>
										</view>
										<view class="icon" v-else>
											<image :src="(btn.icon ? btn.icon : defaultIcon2) + ' '" alt=""></image>
										</view>
										<view class="p" v-if="btn.text">{{ btn.text }}</view>
									</view>
								</view>
							</view>
						</view>
					</view>

					<view class="dataCountBox"
						:style="'margin-left:' + (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0)">
						<view class="dataCount ul">
							<view @click="goLink(item.code != 'zan' ? masterDomain + '/user/' + (userinfo ? userinfo.userid : '0') + '/' + item.code : appConfig.cfg_user_index + '/im/commt_list.html#zan',1)" hover-class="none" :url=" userinfo ? encodeUrl( item.code != 'zan' ? masterDomain + '/user/' + (userinfo ? userinfo.userid : '0') + '/' + item.code : appConfig.cfg_user_index + '/im/commt_list.html#zan' ) : loginUrl
                                " class="li" v-for="(item, ind) in circleData" :key="ind">
								<text class="span"
									v-if="item.code == 'zan'">{{ item.num > 999 ? '999+' : item.num }}</text>

								<text class="span"
									v-else>{{ item.num >= 10000 ? NumberFomart(item.num) : item.num }}</text>

								<text class="em">{{ item.text }}</text>
							</view>
						</view>
						<view class="mrightCon" v-if="globalData.appConfig.cfg_business_state">
							<view hover-class="none" @click="toLink(memberComp.branchShow?memberComp.branch:memberComp.business,1)"
								:url="userinfo ? encodeUrl(memberComp.branchShow?memberComp.branch.link:memberComp.business.link) : loginUrl"
								v-if="userinfo && userinfo.is_staff == 1 && memberComp.branchShow" class="rbtn a"
								:style="
                                    'background:linear-gradient(90deg, ' +
                                    checkBgColor(memberComp.qiandaoBtn.style.background, memberComp.qiandaoBtn.style.opacity) +
                                    ' 0%, ' +
                                    (memberComp.qiandaoBtn.style.background + '00') +
                                    ' 100%); color:' +
                                    memberComp.qiandaoBtn.style.color +
                                    ';'
                                ">
								<view class="s">
									<image :src="memberComp.branch.icon"></image>
								</view>
								<view class="span">{{ memberComp.branch.text }}</view>
							</view>
							<view hover-class="none" @click="toLink(memberComp.business,1)"
								:url="userinfo ? encodeUrl(memberComp.business.link) : loginUrl" v-else class="rbtn a"
								:style="
                                    'background:linear-gradient(90deg, ' +
                                    checkBgColor(memberComp.qiandaoBtn.style.background, memberComp.qiandaoBtn.style.opacity) +
                                    ' 0%, ' +
                                    (memberComp.qiandaoBtn.style.background + '00') +
                                    ' 100%); color:' +
                                    memberComp.qiandaoBtn.style.color +
                                    ';'
                                ">
								<view class="s">
									<image :src="memberComp.business.icon"></image>
								</view>
								<view class="span">{{ memberComp.business.text }}</view>
							</view>
						</view>
					</view>
				</block>

				<!-- 模板4 -->
				<block v-else-if="memberComp.theme == 4">
					<view class="memberInfoCon" :style="'margin:0 0 0 ' + toRPX(memberComp.cardStyle.marginLeft)">
						<navigator hover-class="none" class="mleftCon fn-clear a" :url="userinfo? proUrl: loginUrl"
							@click="userinfo?'':needReload=true">
							<view class="photoCon">
								<image
									:src="userinfo && userinfo.photo ? userinfo.photo : masterDomain + '/static/images/noPhoto_100.jpg'"
									@error="imgloadErr" :lazy-load="true"
									:data-errImg="masterDomain + '/static/images/noPhoto_100.jpg'" mode="aspectFill"
									data-type="userinfo" data-prop="photo"></image>
							</view>
							<view class="textCon">
								<view class="h4">{{ userinfo ? userinfo.nickname : '登录/注册' }}</view>
								<view class="dataCount ul" v-if="userinfo">
									<navigator :url="
                                            userinfo
                                                ? encodeUrl(
                                                      item.code != 'zan'
                                                          ? masterDomain + '/user/' + (userinfo ? userinfo.userid : '0') + '/' + item.code
                                                          : appConfig.cfg_user_index + '/im/commt_list.html#zan'
                                                  )
                                                : loginUrl
                                        " class="li" v-for="(item, ind) in circleData" :key="ind">
										<text class="span"
											v-if="item.code == 'zan'">{{ item.num > 999 ? '999+' : item.num }}</text>

										<text class="span"
											v-else>{{ item.num >= 10000 ? NumberFomart(item.num) : item.num }}</text>

										<text class="em">{{ item.text }}</text>
									</navigator>
								</view>
							</view>
							<view class="arr s" :style="'margin-right:' + toRPX(memberComp.cardStyle.marginLeft) + ';'"
								v-if="!memberComp.qiandaoBtn.show">
								<svg class="em" width="12rpx" height="24rpx"
									:color="memberComp.qiandaoBtn.style.arr_color"
									src="/static/svg/member/arr_icon01.svg"></svg>
							</view>
						</navigator>
						<view class="mrightCon" v-if="userinfo && memberComp.qiandaoBtn.show">
							<view v-if="memberComp.qiandaoBtn.show" hover-class="none" @click="toLink(memberComp.qiandaoBtn,1)"
								:url="encodeUrl(memberComp.qiandaoBtn.link)" class="rbtn a" :style="
                                    'background:linear-gradient(90deg, ' +
                                    checkBgColor(memberComp.qiandaoBtn.style.background, memberComp.qiandaoBtn.style.opacity) +
                                    ' 0%, ' +
                                    (memberComp.qiandaoBtn.style.background + '00') +
                                    ' 100%); color:' +
                                    memberComp.qiandaoBtn.style.color +
                                    ';'
                                ">
								<view class="s">
									<image :src="memberComp.qiandaoBtn.icon"></image>
								</view>
								<view class="span">{{ memberComp.qiandaoBtn.text }}</view>
							</view>
						</view>
					</view>
				</block>

				<!-- 会员卡片 -->
				<view class="vipCardContainer"
					v-if="appConfig.cfg_ios_review === '0' && (memberComp && memberComp.vipCard && !memberComp.vipCard.cardHide)"
					:style="
                        'margin-left:' +
                        (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                        ';margin-right:' +
                        (memberComp&&memberComp.cardStyle ? toRPX(memberComp.cardStyle.marginLeft) : 0) +
                        ';'
                    ">
					<view :class="'vipCardCon vipCarCon' + memberComp.vipCard.theme"
						:style="getStyle('vipCardBox', 'margin', memberComp)" v-if="memberComp.vipCard">
						<view :class="memberComp.vipCard.theme === 3 ? 'vipCardStyle3' : ''"
							:style="memberComp.vipCard.theme === 3 ? getStyle('vipCardBox', 'out', memberComp) : ''"
							v-if="memberComp.vipCard.theme !== 2">
							<view class="vipCardBox vipCardStyle1 " v-if="!iosMiniHide"
								:style="getStyle('vipCardBox', 'inner', memberComp)">
								<!-- 会员图标 -->
								<view :class="
                                        'vipIconBox ' +
                                        (memberComp.vipCard.subtitle.length > 1 ||
                                        (memberComp.vipCard.subtitle.length == 1 && (memberComp.vipCard.subtitle[0].type != 1 || (userinfo && userinfo.level))) > 0
                                            ? 'hasLine'
                                            : '')
                                    ">
									<block
										v-if="!userinfo || !userinfo.level || !checkVipLevel(userinfo) || memberComp.theme !== 4">
										<view
											:class="'imgbox ' + (hasIn(memberComp.vipCard.icon, masterDomain + '/static/images/admin/') ? 'canWhite' : '')">
											<view class="image">
												<svg v-if="hasIn(memberComp.vipCard.icon, masterDomain + '/static/images/admin/')"
													width="82rpx" height="32rpx"
													:color="memberComp.vipCard.titleStyle.color"
													src="/static/svg/member/vip_icon01.svg"></svg>
												<image v-else mode="heightFix" :src="memberComp.vipCard.icon" alt="">
												</image>
											</view>
										</view>
										<view class="span"
											:style="'color:' + memberComp.vipCard.titleStyle.color + ';'">
											{{ memberComp.vipCard.title }}
										</view>
									</block>
									<block v-else>
										<view class="imgbox" hover-class="none" :hover-stop-propagation="false"
											style="margin-top: 4rpx">
											<image mode="heightFix" :src="userinfo.levelIcon" alt=""></image>
										</view>
										<view class="span"
											:style="'color:' + memberComp.vipCard.titleStyle.color + ';'">
											{{
                                                !userinfo || !userinfo.level || !checkVipLevel(userinfo) || memberComp.theme !== 4
                                                    ? memberComp.vipCard.title
                                                    : userinfo.levelName
                                            }}
										</view>
									</block>
								</view>

								<!-- 会员滚动文字 -->
								<block v-if="
                                        memberComp.vipCard.subtitle.length == 1 &&
                                        memberComp.vipCard.subtitle[0].type == 1 &&
                                        (!userinfo || userinfo.level == 0 || !checkVipLevel(userinfo))
                                    "></block>
								<view class="vipScrollBox"
									v-else-if="memberComp.vipCard&&memberComp.vipCard.subtitle && memberComp.vipCard.subtitle.length > 0">
									<view class="swiperBox">
										<swiper class="searchSwipe search" interval="2000" :circular="true"
											:vertical="true" :autoplay="true"
											v-if="memberComp.vipCard.subtitle.length > 1 || (userinfo && userinfo.level) || memberComp.vipCard.subtitle[0].type !== 1">
											<block v-for="(item, index) in memberComp.vipCard.subtitle" :key="index">
												<swiper-item
													v-if="item&&item.type !== 1 || (userinfo && checkVipLevel(userinfo))">
													<view class="bitem">
														<view class="p" v-if="item.type !== 1"
															:style="'color:' + memberComp.vipCard.subStyle.color + ';'">
															{{ item.text }}
														</view>
														<view class="p" v-else-if="userinfo && checkVipLevel(userinfo)"
															:style="'color:' + memberComp.vipCard.subStyle.color + ';'">
															{{ checkVipLevelText(userinfo) }}
														</view>
													</view>
												</swiper-item>
											</block>
										</swiper>
									</view>
								</view>
								<view hover-class="none" @click="goLink(memberComp.vipCard.btnLink ? memberComp.vipCard.btnLink : upgradeUrl,1)"
									:url="userinfo ? encodeUrl(memberComp.vipCard.btnLink ? memberComp.vipCard.btnLink : upgradeUrl) : loginUrl"
									:class="'vip_btn ' + (memberComp.vipCard.btnStyle.styleType == 'arrow' ? 'arrow_btn' : '')"
									:style="getStyle('vipCardBtn', '', memberComp)">
									<text
										class="span">{{ !userinfo.level || expireVip ? memberComp.vipCard.btnText : '立即续费' }}</text>
									<view class="s">
										<svg v-if="memberComp.vipCard.btnStyle.styleType == 'arrow'" width="36rpx"
											height="36rpx" :color="memberComp.vipCard.btnStyle.style.background"
											src="/static/svg/member/arr_icon.svg"></svg>
									</view>
								</view>
							</view>

							<!-- 样式3的财务信息 -->
							<view class="financeInfo"
								v-if="memberComp.vipCard.theme === 3 && memberComp.financeCount.showItems.length > 0">
								<view class="ul">
									<view hover-class="none" @click="toLink(item,1)"
										:url="userinfo ? encodeUrl(item.link, appConfig.cfg_user_index) : loginUrl"
										class="li" :style="getStyle('financeInfo', '', memberComp)"
										v-for="(item, index) in checkArr(memberComp.financeCount.showItems, financeOption, appConfig.cfg_ios_review)"
										:key="index">
										<view class="a" :style="getStyle('financeInfo', 1, memberComp)">
											{{ item.text }}<text class="b"
												:style="'color:' + memberComp.financeCount.numberStyle.color">{{ userinfo[item.code] ? userinfo[item.code] : 0 }}</text>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="vipCardStyle2 vipCardBox" v-show="!iosMiniHide"
							:style="getStyle('vipCardBox', '', memberComp)" v-else-if="memberComp.vipCard.theme === 2">
							<view class="columnBox" hover-class="none" :hover-stop-propagation="false">
								<!-- 会员图标 -->
								<view :class="
                                        'vipIconBox ' +
                                        (memberComp.vipCard.subtitle.length > 1 ||
                                        (memberComp.vipCard.subtitle.length == 1 && (memberComp.vipCard.subtitle[0].type != 1 || (userinfo && userinfo.level))) > 0
                                            ? 'hasLine'
                                            : '')
                                    ">
									<!-- 会员图标 -->
									<block
										v-if="!userinfo || !userinfo.level || !checkVipLevel(userinfo) || memberComp.theme !== 4">
										<view
											:class="'imgbox ' + (hasIn(memberComp.vipCard.icon, masterDomain + '/static/images/admin/') ? 'canWhite' : '')">
											<view class="image">
												<svg v-if="hasIn(memberComp.vipCard.icon, masterDomain + '/static/images/admin/')"
													width="82rpx" height="32rpx"
													:color="memberComp.vipCard.titleStyle.color"
													src="/static/svg/member/vip_icon01.svg"></svg>
												<image v-else mode="heightFix" :src="memberComp.vipCard.icon" alt="">
												</image>
											</view>
										</view>
										<view class="span"
											:style="'color:' + memberComp.vipCard.titleStyle.color + ';'">
											{{ memberComp.vipCard.title }}
										</view>
									</block>
									<block v-else>
										<view class="imgbox" hover-class="none" :hover-stop-propagation="false"
											style="margin-top: 4rpx">
											<image mode="heightFix" :src="userinfo.levelIcon" alt=""></image>
										</view>
										<view class="span"
											:style="'color:' + memberComp.vipCard.titleStyle.color + ';'">
											{{
                                                !userinfo || !userinfo.level || !checkVipLevel(userinfo) || memberComp.vipCard.theme !== 4
                                                    ? memberComp.vipCard.title
                                                    : userinfo.levelName
                                            }}
										</view>
									</block>
								</view>
								<!-- 会员滚动文字 -->
								<block v-if="
                                        memberComp.vipCard.subtitle.length == 1 &&
                                        memberComp.vipCard.subtitle[0].type == 1 &&
                                        (!userinfo || userinfo.level == 0 || !checkVipLevel(userinfo))
                                    "></block>
								<view class="vipScrollBox"
									v-else-if="memberComp.vipCard&&memberComp.vipCard.subtitle && memberComp.vipCard.subtitle.length > 0">
									<view class="swiperBox">
										<swiper class="searchSwipe search" interval="2000" :circular="true"
											:vertical="true" :autoplay="true">
											<block v-if="item&&item.type !== 1 || (userinfo && checkVipLevel(userinfo))"
												v-for="(item, index) in memberComp.vipCard.subtitle" :key="index">
												<swiper-item>
													<view class="bitem">
														<view class="p" v-if="item.type !== 1"
															:style="'color:' + memberComp.vipCard.subStyle.color + ';'">
															{{ item.text }}
														</view>
														<view class="p" v-else-if="userinfo && checkVipLevel(userinfo)"
															:style="'color:' + memberComp.vipCard.subStyle.color + ';'">
															{{ checkVipLevelText(userinfo) }}
														</view>
													</view>
												</swiper-item>
											</block>
										</swiper>
									</view>
								</view>
							</view>
							<view hover-class="none" @click="goLink(memberComp.vipCard.btnLink ? memberComp.vipCard.btnLink : upgradeUrl,1)"
								:url="userinfo ? encodeUrl(memberComp.vipCard.btnLink ? memberComp.vipCard.btnLink : upgradeUrl) : loginUrl"
								:class="'vip_btn ' + (memberComp.vipCard.btnStyle.styleType == 'arrow' ? 'arrow_btn' : '')"
								:style="getStyle('vipCardBtn', '', memberComp)">
								<text
									class="span">{{ !userinfo.level || expireVip ? memberComp.vipCard.btnText : '立即续费' }}</text>
								<view class="s">
									<svg v-if="memberComp.vipCard.btnStyle.styleType == 'arrow'" width="36rpx"
										height="36rpx" :color="memberComp.vipCard.btnStyle.style.background"
										src="/static/svg/member/arr_icon.svg"></svg>
								</view>
							</view>
						</view>
						<view class="btnsGroupBox" :style="getStyle('vipCardBox', 'radius', memberComp)"
							v-if="memberComp.vipBtnsGroup.length > 0 && memberComp.theme != 1">
							<view class="ul">
								<view class="li" v-for="(btn, index) in memberComp.vipBtnsGroup" :key="index">
									<view @click="toLink(btn,1)" hover-class="none" class="a"
										:url="userinfo ? encodeUrl(btn.link) : loginUrl">
										<view class="icon">
											<image :src="btn.icon" alt=""></image>
										</view>
										<view class="p">{{ btn.text }}</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 其他 -->
		<view class="otherContainer" v-if="compArrs && compArrs.length">
			<view class="partBox" v-for="(obj, oInd) in compArrs" :key="oInd">
				<!-- 订单管理 -->

				<view class="orderInfoBorderBox" v-if="obj.id == 2">
					<view class="orderInfoBox" :style="getStyle('orderInfoBox', '', obj.content)">
						<view class="orderHeader" v-if="obj.content.title.show">
							<view class="h4" :style="'color:' + obj.content.title.style.color + ';'">
								{{ obj.content.title.text }}
							</view>
							<view @click="toLink(obj.content.more,1)" hover-class="none" class="a more"
								v-if="obj.content.more.showType == 0"
								:style="'color:' + obj.content.more.style.color + ';'">
								{{ obj.content.more.text }}
								<view class="s" v-if="obj.content.more.arr">
									<svg class="em" imgMode="aspectFit" width="10rpx"  height="20rpx" src="/static/svg/index/more-arr.svg" :color="obj.content.more.style.color" alt=""></svg>
								</view>
							</view>
						</view>
						<view :class="'ul ' + (obj.content.showItems.length <= 4 ? 'gridbox4' : 'gridbox5')">
							<view class="li"
								v-for="(btn, ind) in checkArr(obj.content.showItems, obj.content.orderOption, '', 'order')"
								:key="ind">
								<view hover-class="none" class="a" @click="toLink(btn,1)"
									:url="userinfo ? encodeUrl(btn.link) : loginUrl">
									<view class="icon">
										<view class="tipNum span"
											:style="'background:' + obj.content.tipNumStyle.background + ';'"
											v-if="hasIn(obj.content.showNumItems, btn.id) && orderInfo[btn.code]">
											{{ orderInfo[btn.code] <= 99 ? orderInfo[btn.code] : '99+' }}
										</view>
										<image mode="aspeFit" :src="btn.icon" alt=""></image>
									</view>
									<view class="p"
										:style="'color:' + obj.content.btnStyle.color + '; font-size: ' + toRPX(obj.content.btnStyle.fontSize) + ';'">
										{{ btn.btnText }}
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>

				<!-- 财务卡片 -->

				<view class="orderInfoBorderBox"
					v-else-if="obj.id == 3 && appConfig && appConfig.cfg_ios_review === '0'">
					<view class="orderInfoBox" :style="getStyle('financeInfoBox', '', obj.content)">
						<view class="orderHeader" v-if="obj.content.title.show">
							<view class="h4" :style="'color:' + obj.content.title.style.color + ';'">
								{{ obj.content.title.text }}
							</view>
							<view  @click="toLink(obj.content.more,1)"  hover-class="none" :url="userinfo ? encodeUrl(obj.content.more.link) : loginUrl"
								class="more a" v-if="obj.content.more.show"
								:style="'color:' + obj.content.more.style.color + ';'">
								{{ obj.content.more.text }}
								<view class="s" v-if="obj.content.more.arr">
									<svg class="em" imgMode="aspectFit" width="10rpx"  height="20rpx" src="/static/svg/index/more-arr.svg" :color="obj.content.more.style.color" alt=""></svg>
								</view>
							</view>
						</view>
						<view
							:class="'financeInfo_ul ul gridbox' + checkArr(obj.content.showItems, financeOption, appConfig.cfg_ios_review).length + ' '">
							<view class="li" v-for="(btn, ind) in checkArr(obj.content.showItems, financeOption)"
								:key="ind">
								<view hover-class="none" class="a" @click="toLink(btn,1)" 
									:url="userinfo ? encodeUrl(btn.link, appConfig.cfg_user_index) : loginUrl">
									<view class="numberShow" v-if="btn.id != 3 && btn.id != 1"
										:style="'color:' + obj.content.numberStyle.color + ';'">
										<text class="span">
											{{ appConfig ? appConfig.currency.symbol : '￥' }}
											<text class="b">{{ numberDot(userinfo[btn.code])[0] }}</text>
											.{{ numberDot(userinfo[btn.code]).length > 1 ? numberDot(userinfo[btn.code])[1] : '00' }}
										</text>
									</view>
									<view class="numberShow" v-else
										:style="'color:' + obj.content.numberStyle.color + ';'">
										<text class="span">
											<text class="b">{{ userinfo[btn.code] ? userinfo[btn.code] : 0 }}</text>
										</text>
										{{ btn.id === 3 ? '张' : '' }}
									</view>
									<view class="p"
										:style="'color:' + obj.content.textStyle.color + ';font-size: ' + toRPX(obj.content.textStyle.fontSize) + ';'">
										{{ btn.text }}
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>

				<!-- 图标组 -->

				<view class="orderInfoBorderBox" v-else-if="obj.id == 4 && removeEmpty(obj.content.btns.list).length">
					<view class="orderInfoBox iconsInfoBox" :style="getStyle('iconsInfoBox', '', obj.content)">
						<view class="orderHeader" v-if="obj.content.title.show">
							<view class="h4" :style="'color:' + obj.content.title.style.color + ';'">
								{{ obj.content.title.text ? obj.content.title.text : '标题文字' }}
							</view>
							<view  @click="toLink(obj.content.more,1)" hover-class="none" class="more span"
								:url="userinfo ? encodeUrl(obj.content.more.link) : loginUrl"
								v-if="obj.content.more.show" :style="'color:' + obj.content.more.style.color + ';'">
								{{ obj.content.more.text }}
								<view class="s" v-if="obj.content.more.arr">
									<svg class="em" imgMode="aspectFit" width="10rpx"  height="20rpx" src="/static/svg/index/more-arr.svg" :color="obj.content.more.style.color" alt=""></svg>
								</view>
							</view>
						</view>
						<view :class="'gridbox' + (obj.content.column ? obj.content.column : 5) + ' ul '">
							<block  v-for="(btn, ind) in removeEmpty(obj.content.btns.list)" :key="ind">
								<view class="li" v-if="!hasIn(btn.link, '/mobile.html') || !globalData.appBoolean">
									<view v-if="hasIn(btn.link, 'tel:')" :data-phone="btn.link" hover-class="none"
										:hover-stop-propagation="false" @tap="callPhone">
										<view class="icon">
											<image
												:src="(btn.icon ? btn.icon : masterDomain + '/static/static/images/admin/siteMemberPage/default_icon1.png') + ' '"
												alt="" @error=" btn.icon = masterDomain + '/static/static/images/admin/siteMemberPage/default_icon1.png'"></image>
										</view>
										<view class="p" v-if="btn.text"
											:style="'color:' + obj.content.btns.style.color + ';'">{{ btn.text }}</view>
										<view v-else class="placeholder p">按钮{{ ind + 1 }}</view>
									</view>

									<view v-else-if="!hasIn(btn.link, '/mobile.html')" hover-class="none" @click="toLink(btn,1)"
										:url="userinfo ? encodeUrl(btn.link) : loginUrl" class="a">
										<view class="icon">
											<image
												:src="(btn.icon ? btn.icon : masterDomain + '/static/images/admin/siteMemberPage/default_icon1.png') + ' '"
												alt=""></image>
										</view>
										<view class="p" v-if="btn.text"
											:style="'color:' + obj.content.btns.style.color + ';font-size: ' + toRPX(obj.content.btns.style.fontSize) + ';'">
											{{ btn.text }}
										</view>
										<view v-else class="placeholder p">按钮{{ ind + 1 }}</view>
									</view>
									<view v-else hover-class="none" @click="toLink(btn,1)"
										:url="userinfo ? encodeUrl(btn.link) : loginUrl" class="a">
										<view class="icon">
											<image
												:src="(btn.icon ? btn.icon : masterDomain + '/static/images/admin/siteMemberPage/default_icon1.png') + ' '"
												alt=""></image>
										</view>
										<view class="p" v-if="btn.text"
											:style="'color:' + obj.content.btns.style.color + ';font-size: ' + toRPX(obj.content.btns.style.fontSize) + ';'">
											{{ btn.text }}
										</view>
										<view v-else class="placeholder p">按钮{{ ind + 1 }}</view>
									</view>
								</view>	
							</block>
							
						</view>
						<view  @click="goLink(qiandaoBtnLink)" :url="encodeUrl(qiandaoBtnLink)" :data-url="qiandaoBtnLink" class="qiandao"
							v-if="userinfo && obj.content.qiandao.show"
							:style="'background:' + obj.content.qiandao.style.background + ';color:' + obj.content.qiandao.style.color + ';'">
							<view class="s">
								<image :src="obj.content.qiandao.icon" alt=""></image>
							</view>
							<text class="qtext span"
								v-if="userinfo.qiandao && userinfo.qiandao.tips">{{ userinfo.qiandao.tips }}</text>
							<view hover-class="none"
								:style="'color:' + obj.content.qiandao.style.color + ';border-color:' + obj.content.qiandao.style.color + ';'"
								class="qbtn a">
								{{userinfo.qiandao&&!userinfo.qiandao.today?'去签到':'已签到'}}
							</view>
						</view>
					</view>
				</view>

				<!-- 列表导航 -->

				<view class="orderInfoBorderBox" v-else-if="obj.id == 5 && removeEmpty(obj.content.list).length">
					<view class="orderInfoBox listInfoBox" :style="getStyle('listInfoBox', '', obj.content)">
						<view class="list ul">
							<view class="li" :style="'height:' + toRPX(obj.content.style.lineHeight) + ';'"
								v-for="(btn, ind) in removeEmpty(obj.content.list)" :key="ind">
								<view hover-class="none" :url="userinfo ? encodeUrl(btn.link) : loginUrl" @click="toLink(btn,1)" 
									class="flex_li a">
									<view class="flex_l">
										<view class="icon">
											<image
												:src="btn.icon ? btn.icon : masterDomain + '/static/static/images/admin/siteMemberPage/default_icon2.png'"
												alt=""></image>
										</view>
										<view class="text" :style="'color:' + obj.content.style.color + ';'">
											{{ btn.text ? btn.text : '文字' + (ind + 1) }}
										</view>
									</view>
									<view class="flex_r">
										<text class="tip span"
											:style="'color:' + obj.content.tipStyle.color + ';'">{{ btn.tip.text }}</text>
										<view class="arr s">
											<svg class="em" width="16rpx" height="24rpx"
												:color="obj.content.tipStyle.color"
												src="/static/svg/member/more-arr.svg"></svg>
										</view>
									</view>
									<view class="line s"
										v-if="ind != removeEmpty(obj.content.list).length - 1 && obj.content.splitLine"></view>
								</view>
							</view>
						</view>
						<view :url="encodeUrl(qiandaoBtnLink)" :data-url="qiandaoBtnLink" class="qiandao"  @click="goLink(qiandaoBtnLink)" 
							v-if="userinfo && obj.content.qiandao.show"
							:style="'background:' + obj.content.qiandao.style.background + ';color:' + obj.content.qiandao.style.color + ';'">
							<view class="s">
								<image :src="obj.content.qiandao.icon" alt=""></image>
							</view>
							<view class="qtext span" v-if="userinfo.qiandao && userinfo.qiandao.tips">
								{{ userinfo.qiandao.tips }}
							</view>
							<view hover-class="none" class="qbtn a"
								:style="'border-color:' + obj.content.qiandao.style.color + ';color:' + obj.content.qiandao.style.color">
								{{userinfo.qiandao&&!userinfo.qiandao.today?'去签到':'已签到'}}
							</view>
						</view>
					</view>
				</view>

				<!-- 关注公众号  obj.id == 6 && userinfo.wechat_subscribe === '0'-->

				<view :class="'orderInfoBorderBox ' + (obj.content.custom ? 'customWechat' : '')"
					v-else-if="obj.id == 6 && userinfo.wechat_subscribe === '0'&&fixshow">
					<view class="orderInfoBox wechatInfoBox" :style="getStyle('wechatInfo', '', obj.content)">
						<block v-if="!obj.content.custom">
							<view class="flex_l">
								<view class="icon" v-if="obj.content.iconShow">
									<image :src="obj.content.icon" alt=""></image>
								</view>
								<view class="text">
									<view class="h4" :style="'color:' + obj.content['titleStyle'].color + ';'">
										{{ obj.content.title }}
									</view>
									<view class="p" :style="'color:' + obj.content['subtitleStyle'].color + ';'">
										{{ obj.content.subtitle }}
									</view>
								</view>
							</view>
							<view class="flex_r">
								<view class="span"
									:style="'color:' + obj.content.btnStyle.color + ';border-color:' + obj.content.btnStyle.color + ';'"
									@tap="changeWxPop" data-type="0">
									关注
								</view>
							</view>
						</block>
						<image :src="obj.content.image" v-else class="image" alt=""></image>
					</view>
				</view>

				<!-- 瓷片广告 -->

				<view class="orderInfoBorderBox" v-else-if="obj.id == 7 && checkEmpty(obj.content.list,obj.content.column).length">
					<view class="orderInfoBox advInfoBox" :style="
                            'margin: ' +
                            toRPX(obj.content.style.marginTop) +
                            ' ' +
                            toRPX(obj.content.style.marginLeft) +
                            ' 0; height:' +
                            toRPX(obj.content.style.height)
                        ">
						<view :class="'advList advList' + obj.content.column"
							:style="'grid-template-columns: repeat(' + obj.content.column + ',1fr)'"
							v-if="obj.content.column !== 1">
							<view class="adv" :style="'border-radius:' + toRPX(obj.content.style.borderRadius) + '; '"
								v-for="(adv, index) in checkEmpty(obj.content.list,obj.content.column)" :key="index">
								<view hover-class="none" class="a" :url="encodeUrl(adv.link)" @click="toLink(adv)" >
									<image :src="adv.image" alt="" v-if="adv.image"
										:style="'height:' + toRPX(obj.content.style.height) + '; border-radius:' + toRPX(obj.content.style.borderRadius)" mode="aspectFill">
									</image>
								</view>
							</view>
						</view>

						<swiper class="advList"
							:style="'overflow:hidden; border-radius:' + toRPX(obj.content.style.borderRadius)"
							:indicator-dots="true" indicator-active-color="#fff" v-else interval="2000"
							indicator-color="rgba(255,255,255,.5)" :circular="true" :autoplay="true">
							<block v-for="(adv, index) in checkEmpty(obj.content.list,obj.content.column)" :key="index">
								<swiper-item>
									<view hover-class="none" class="a adv" :url="encodeUrl(adv.link)"  @click="toLink(adv)" >
										<image :src="adv.image" alt="" mode="aspectFill"
											:style="'height:' + toRPX(obj.content.style.height) + '; '"></image>
									</view>
								</swiper-item>
							</block>
						</swiper>
					</view>
				</view>

				<!-- 分隔标题 -->

				<view class="orderInfoBorderBox" v-else-if="obj.id == 8">
					<view class="titleInfoBox" :style="getStyle('titleInfo', '', obj.content)">
						<view class="place" v-if="obj.content.layout === 1"></view>
						<view :class="'titleInfo ' + (obj.content.layout === 1 ? 'alignCenter' : '')">
							<view class="icon" v-if="obj.content.title.type == 2">
								<image mode="heightFix"
									:src="obj.content.title.icon ? obj.content.title.icon : defaultIcon2" alt="">
								</image>
							</view>
							<view class="h4"
								:style="'font-weight:bold; font-size:' + toRPX(obj.content.title.style.fontSize) + '; color:' + obj.content.title.style.color + ';'">
								<view class="span">{{ obj.content.title.text ? obj.content.title.text : '标题' }}</view>
								<view class="tit_line"
									:style="'background:' + obj.content.title.style.borderColor + ';'"
									v-if="obj.content.title.type === 1"></view>
							</view>
						</view>
						<view hover-class="none" :url="encodeUrl(obj.content.more.link)" class="moreInfo" @click="toLink(obj.content.more)"
							v-if="obj.content.more.show" :style="'color:' + obj.content.more.style.color + ';'">
							{{ obj.content.more.text }}
							<view class="s" v-if="obj.content.more.arr">
								<svg class="em" imgMode="aspectFit" width="10rpx"  height="20rpx" src="/static/svg/index/more-arr.svg" :color="obj.content.more.style.color" alt=""></svg>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="canvasbox" hover-class="none" :hover-stop-propagation="false">
			<canvas canvas-id="myCanvas" id="myCanvas" type="2d" class="mycanvas"></canvas>
		</view>

		<view :class="{'backIndex':true,'hidePreviewBack': !previewBtn}" v-if="preview" @click="backToIndex">
			<view class="close_preview"><image class="" :src="masterDomain + '/static/images/admin/siteConfigPage/white_close.png'"> </image></view>
			<view>退出预览模式</view>
		</view>

		<view :class="'wx_mask ' + (wxGz&&fixshow ? 'show' : '')" @tap="changeWxPop" data-type="1"></view>
		<view :class="'wxPopBox ' + (wxGz&&fixshow ? 'show' : '')">
			<view class="h4">关注公众号</view>
			<view class="wxQRImg">
				<image :show-menu-by-longpress="true" :src="appConfig.cfg_wechatQr" data-type="wxCode"
					@error="imgloadErr" :data-errImg="masterDomain + '/static/images/404.jpg'" mode="aspectFill" alt="">
				</image>
			</view>
			<view class="con">
				<view class="h5">{{ appConfig.cfg_wechatName }}官方微信</view>
				<view class="p">扫一扫，了解更多信息</view>
			</view>
		</view>
		<view @click="needReload=true">
			<bottom :module="currModule" active="4" :getMsg="true" :needMessage="true" :pageHide="pageHideb"
				:needCity="false"></bottom>
		</view>
		<private_tip :privateShow="privateb"></private_tip>
	</view>
</template>
<script>
	import bottom from '../../../components/bottom_nav/bottom_nav';
	import svg from '../../../components/svgs/svgs';
	// pages/member/index.js
	const app = getApp();
	var _this;
	export default {
		components: {
			bottom,
			svg
		},
		data() {
			return {
				globalData:app.globalData,
				uniPlatform:'',
				addUrlParam: app.addUrlParam,
				biasTop: 0,
				pageHideb: false, //页面显隐
				needReload: false,
				bgColor: '255,255,255',
				// 背景图主色
				slideHide: false,

				// 隐藏头部
				// 会员头部模板二昵称下的数据
				currModule: 'siteConfig',

				circleData: [{
						num: '0',
						text: '关注',
						id: 1,
						code: 'follow',
						link: ''
					},
					{
						num: '0',
						text: '粉丝',
						id: 2,
						code: 'fans',
						link: ''
					},
					{
						num: '0',
						text: '获赞',
						id: 3,
						code: 'zan',
						link: ''
					}
				],

				wxGz: false,
				topShow: false,

				//顶部显示
				paddingRight: 0,

				//头部右侧的位置
				offTop: 0,

				background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
				indicatorDots: true,
				vertical: false,
				autoplay: false,
				interval: 2000,
				duration: 500,
				masterDomain: app.globalData.masterDomain,
				globalData:app.globalData,
				//主域名
				navTop: app.globalData.navTop,

				//头部距离
				userinfo: '',

				//用户信息
				loginUrl: '',

				// 默认登录Url
				defaultIcon1: app.globalData.masterDomain + '/static/images/admin/siteMemberPage/default_icon1.png',

				defaultIcon2: app.globalData.masterDomain + '/static/images/admin/siteMemberPage/default_icon2.png',

				// 会员自定义页面数据
				memberComp: '',

				compArrs: [],

				pageSet: {
					style: {
						background: '',
						color: ''
					},

					layout: 0,
					showType: '',
					title: false
				},

				// 初始项目
				numberOption: [{
						id: 1,
						text: '积分',
						num: '0',
						code: 'point',
						link: '/pocket.html?dtype=1'
					},
					{
						id: 2,
						text: '余额',
						num: '0.0',
						code: 'money',
						link: '/pocket.html?dtype=0'
					},
					{
						id: 3,
						text: '优惠券',
						num: '0',
						code: 'quan',
						link: '/myquan.html'
					},
					{
						id: 4,
						text: '收藏',
						num: '0',
						code: 'collect',
						link: '/collection.html'
					},
					{
						id: 5,
						text: '足迹',
						num: '0',
						code: 'footPrint',
						link: '/history.html'
					},
					{
						id: 6,
						text: '粉丝',
						num: '0',
						code: 'fans',
						link: '/user/29/fans.html'
					},
					{
						id: 7,
						text: '发布',
						num: '0',
						code: 'fabu',
						link: '/manage.html',
						"mini":"/pages/packages/mcenter/fabu/fabu"
					},
					{
						id: 8,
						text: '关注',
						num: '0',
						code: 'follow',
						link: '/user/29/follow.html'
					}
				],

				//数字选项
				financeOption: [{
						id: 1,
						text: '积分',
						num: '0',
						code: 'point',
						
						link: '/pocket.html?dtype=1'
					},
					{
						id: 2,
						text: '余额',
						num: '0.0',
						code: 'money',
						link: '/pocket.html?dtype=0'
					},
					{
						id: 3,
						text: '优惠券',
						num: '0',
						code: 'quan',
						link: '/myquan.html'
					},
					{
						id: 4,
						text: '购物卡',
						num: '0',
						code: 'bonus',
						link: '/consume.html'
					}
				],

				//财务选项

				orderInfo: '',

				appConfig: app.globalData.appConfig,
				mDetails: encodeURIComponent(app.addUrlParam(app.globalData.appConfig.cfg_user_index + '/profile.html')),
				setBtnLink: '',
				qiandaoBtnLink: '',
				msgBtnLink: '',
				profileUrl: '',
				upgradeUrl: '',

				btn: {
					link: '',
					icon: false,
					text: '',
					btnText: '',
					id: 0,
					code: '',

					tip: {
						text: ''
					}
				},

				ind: '',
				type: 0,
				expireVip: '',
				oInd: '',

				obj: {
					id: 0,

					content: {
						title: {
							show: '',

							style: {
								color: '',
								borderColor: ''
							},

							text: '',
							type: 0,
							icon: false
						},

						more: {
							showType: 0,

							style: {
								color: ''
							},

							arr: '',
							show: ''
						},

						showItems: [],

						tipNumStyle: {
							background: ''
						},

						btnStyle: {
							color: ''
						},

						numberStyle: {
							color: ''
						},

						textStyle: {
							color: ''
						},

						column: false,

						btns: {
							list: [],

							style: {
								color: ''
							}
						},

						qiandao: {
							show: '',

							style: {
								background: '',
								color: ''
							},

							icon: ''
						},

						list: [],

						style: {
							color: ''
						},

						tipStyle: {
							color: ''
						},

						splitLine: '',
						custom: false,
						iconShow: '',
						icon: '',
						subtitle: '',
						image: '',
						layout: 0
					}
				},

				color: '',

				adv: {
					image: ''
				},
				//兼容项
				fixshow: false,
				privateb: false,
				paddRight: '',
				proUrl: '',
				iosMiniHide: false,
				preview:'',
				previewBtn:true,
				platform:'', //运行平台
				platForm:app.globalData.platForm,
				fromMod:'',
				businessUrl:'',
			};
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad(options) {
			_this = this;
			_this.uniPlatform =  uni.getSystemInfoSync().uniPlatform;
			_this.platform = _this.uniPlatform == 'mp-weixin' ? 'wxmini' : (_this.uniPlatform == 'web' ? 'h5' : 'dymini')
			if(app.globalData.appBoolean){
				_this.platform = window.app_platform
			}
			if(options.preview){
				this.preview = options.preview
			}

			if(options.module){
				_this.fromMod = options.module
			}
			if (app.globalData.wxprivate == -1) {
				app.watchG('wxprivate', function(value) {
					_this.wxprivate=value;
					if (value) { //弹出弹窗
						_this.privateb = true;
					} else {
						_this.onload(options);
					}
				})
			} else {
				if (app.globalData.wxprivate) { //弹出弹窗
					_this.privateb = true;
				} else {
					_this.onload(options);
				}
			}
			
		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady() {},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow() {
			this.pageHideb = false;
			if (this.needReload) {
				app.reloadFn()
			}

			// 重新获取一下数据
			if(this.userinfo && this.pageSet && (this.pageSet.infoData || this.pageSet.orderData) ){
				this.getUserInfo(this.pageSet.infoData);
				this.getOrderInfo(this.pageSet.orderData);
			}
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide() {
			this.pageHideb = true;
			if (!this.userinfo) {
				this.needReload = true
			}
		},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload() {},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh() {
			app.reloadFn();
		},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom() {},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage(res) {
			let config = app.globalData.appConfig;
			return {
				title: config.share.title,
				desc: config.share.description,
				path: `/pages/${dyConfig.template}/index`,
				imageUrl: app.globalData.siteConfig.sharePic ? app.globalData.siteConfig.sharePic : app.globalData.masterDomain + '/include/json.php?action=getSystemLogo'
			};
		},
		onShareTimeline() {
			return {
				title: config.share.title,
				imageUrl: app.globalData.siteConfig.sharePic ? app.globalData.siteConfig.sharePic : app.globalData.masterDomain + '/include/json.php?action=getSystemLogo'
			};
		},
		// 箭头页面滚动
		onPageScroll(e) {
			if (e.scrollTop > 20 && !_this.topShow) {
				_this.topShow = true
				let bg = _this.pageSet.style.background;
				let rgb = _this.set16ToRgb(bg).replace('rgb(', '').replace(')', '');
				uni.setNavigationBarColor({
					frontColor: _this.isLight(rgb.split(',')) ? '#000000' : '#ffffff',
					backgroundColor: bg,
					fail: res => {
						console.log(res, 1);
					}
				});
			} else if (e.scrollTop <= 20 && _this.topShow) {
				_this.slideHide = true
				_this.topShow = false
				setTimeout(() => {
					_this.slideHide = false
					uni.setNavigationBarColor({
						frontColor: '#000000',
						backgroundColor: '#ffffff',
						fail: res => {
							console.log(res, 2);
						}
					});
				}, 200);
			}
		},
		methods: {
			onload(options) {
				_this.checkiOSMini(); //获取设备信息
				let currPath = encodeURIComponent('/pages/member/index/index');
				if (app.globalData.loginMode == 0) { //原生（抖音默认为0）
					_this.loginUrl = '/pages/login/index?wxMiniProgramLogin=1&back=1&path=' + currPath;
				} else { //H5
					_this.loginUrl = '/pages/redirect/index?url=' + encodeURIComponent(app.addUrlParam(app.globalData
						.masterDomain + '/login.html?from=wxmini&wxMiniProgramLogin=1&path=' + currPath,
						'forcelogout'));
				}
				// 平台切换
				let platForm = app.globalData.platForm;
				this.platForm = platForm;
				let info = uni.getMenuButtonBoundingClientRect();
				_this.paddingRight = info.width + app.globalData.ww - info.right
				if (platForm == 'mp-toutiao') { //抖音
					this.fixshow = false; //吸顶头
					this.paddRight = '';
					this.proUrl = `/pages/redirect/index?url=${encodeURIComponent(app.addUrlParam(this.mDetails))}`
				} else if (platForm == 'mp-weixin') { //微信
					// if (Boolean(app.globalData.biasTop_88)) {
					// 	this.biasTop = app.globalData.biasTop_88 //顶部偏差
					// } else {
					// }
						app.biasTop('.headerTop', _this)
					this.fixshow = true; //吸顶头
					this.paddRight = `padding-right:${this.paddingRight+10}px`; //胶囊的右边距
					this.proUrl = '/pages/member/profile/index';
				}
				//数据加载
				if (options.access_token && options.refresh_token) {
					app.globalData.userid = options.userid
					uni.setStorage({
						key: 'access_token',
						data: options.access_token
					});
					uni.setStorage({
						key: 'refresh_token',
						data: options.refresh_token
					});
					var token_expired = Date.parse(new Date()) / 1000 + 7200 -
						20; //两个小时有效期，保险起见，用1小时59分钟40秒
					uni.setStorage({
						key: 'token_expired',
						data: token_expired
					});
					uni.setStorage({
						key: 'userid',
						data: options.userid,
					})
				}
				_this.currModule = options.module ? options.module : 'siteConfig'
				_this.changeUrl();
				_this.checkAppConfig();
				_this.getMemberConfig(); //获取页面配置
			},
			checkLogin() { //登录判断
				uni.getStorage({
					key: 'userid',
					success: res => {
						if (!res.data) {
							app.globalData.userid = '';
							this.userid = '';
							app.tologin(this.loginUrl)
						}
					}
				})
			},
			changeUrl() {
				let userid = uni.getStorageSync('userid');
				if (userid) {
					app.globalData.userid = userid;
					let newObj = [];
					let numberOption = JSON.parse(JSON.stringify(_this.numberOption));
					for (let i = 0; i < numberOption.length; i++) {
						let item = _this.numberOption[i];
						if (item.code == 'fans' || item.code == 'follow') {
							item.link = item.link.replace('29', userid);
						}
						newObj.push(item);
					}
					_this.numberOption = newObj
				}
			},

			// 获取app相关配置
			checkAppConfig() {
				var interval = setInterval(function() {
					if (app.globalData.appConfig.cfg_user_index) {
						_this.appConfig = app.globalData.appConfig
						_this.setBtnLink = app.globalData.appConfig.cfg_user_index + '/setting'
						_this.qiandaoBtnLink = app.globalData.appConfig.cfg_user_index + '/qiandao'
						_this.msgBtnLink = app.globalData.appConfig.cfg_user_index + '/message'
						_this.profileUrl = app.globalData.appConfig.cfg_user_index + '/profile'
						_this.upgradeUrl = app.globalData.appConfig.cfg_user_index + '/upgrade'
						clearInterval(interval);
						_this.changeOptions(app.globalData.appConfig);
					}
				}, 500);
			},

			// 修改相关配置
			changeOptions(config) {
				const that = this;
				let numberOption = JSON.parse(JSON.stringify(that.numberOption));
				let financeOption = JSON.parse(JSON.stringify(that.financeOption));
				var newObj = numberOption.map((item) => {
					let obj = item;
					if (obj.id === 1) {
						obj.text = config.cfg_pointName;
					}
					if (obj.id == 6 || obj.id == 8) {
						obj.link = app.globalData.masterDomain + item.link;
					} else {
						obj.link = config.cfg_user_index + item.link;
					}
					return obj;
				});
				var newObj2 = financeOption.map((item) => {
					let obj = item;
					if (obj.id === 1) {
						obj.text = config.cfg_pointName;
					} else if (obj.id === 4) {
						obj.text = config.cfg_bonusName;
					}
					obj.link = config.cfg_user_index + item.link;
					return obj;
				});
				_this.numberOption = newObj
				_this.financeOption = newObj2
			},

			callPhone(e) {
				let phone = e.currentTarget.dataset.phone;
				if (phone.indexOf('tel:') > -1) {
					phone = phone.replace('tel:', '');
				}
				if(app.globalData.appBoolean && app.globalData.platForm == 'web'){
					window.location.href = 'tel:' + phone
				}else{
					uni.makePhoneCall({
						phoneNumber: phone //仅为示例
					});
				}
			},

			checkOffTop() {
				const query = uni.createSelectorQuery().in(this);
				let queryObj = '.placeTop';
				let info = uni.getMenuButtonBoundingClientRect();
				query.select(queryObj).boundingClientRect((rect) => {
					if (rect) {
						_this.offTop = -(rect.height - info.height) / 2 - (_this.navTop - info.top)
					}
				}).exec();
			},

			// 获取配置
			getMemberConfig() {
				const that = this;
				let dataPrarm = 'service=siteConfig&action=userCenterDiy&platform=' + that.platform;
				let urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.post({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						let config = data.info;
						_this.memberComp = config.memberComp;
						_this.businessUrl = _this.memberComp.business.link
						if(_this.fromMod && _this.fromMod == 'marry'){
							_this.$set(_this.memberComp.business,'link',app.globalData.appConfig.cfg_business_index + '/marry.html')
						}
						//会员信息头部配置
						_this.compArrs = config.compArrs
						_this.pageSet = config.pageSet
						let userid = uni.getStorageSync('userid');
						if (!userid) {
							//没有获取用户id

							let showArr = [];
							let count = 0;
							for (let i = 0; i < config.compArrs.length; i++) {
								if (config.compArrs[i].id != 6 && config.compArrs[i].id != 7) {
									showArr.push(config.compArrs[i]);
									if (config.compArrs[i].id !== 8) {
										count = count + 1;
									}
									if (count == 3) {
										break;
									}
								}
							}
							_this.compArrs = showArr
						} else {
							that.getUserInfo(that.pageSet.infoData);
							that.getOrderInfo(that.pageSet.orderData);
						}
						that.checkOffTop(); //计算药丸的相关值
						if (config.memberComp.bgType == 'image') {
							that.setBackgroundColor(config.memberComp.style.bg_image);
						} else {
							let bg = config.memberComp.style.bg_color;
							let rgb = that.set16ToRgb(bg).replace('rgb(', '').replace(')', '');
							uni.setNavigationBarColor({
								frontColor: that.isLight(rgb.split(',')) ? '#000000' : '#ffffff',
								backgroundColor: '#ffffff'
							});
							_this.bgColor = that.isLight(rgb.split(',')) ? '#000000' : '#ffffff'
						}
					}

				})
			},

			// 获取用户信息
			getUserInfo(infoData) {
				const that = this;
				let userid = uni.getStorageSync('userid');
				if(!userid) return false; //没有获取到用户信息
				let dataParam = 'service=member&action=detail&id=' + userid + '&need_data=' + infoData.join(',');
				let urlData = app.encodeUrl(dataParam);
				_this.$ajax.post({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						let circleData = that.circleData;
						for (let i = 0; i < circleData.length; i++) {
							circleData[i].num = data.info[circleData[i].code];
						}
						_this.userinfo = data.info
						_this.circleData
					}
				})
			},

			imgloadErr(e) {
				const that = this;
				let err_img = e.target.dataset.errImg;
				let err_type = e.target.dataset.type;
				let err_prop = e.target.dataset.prop;
				if (err_type == 'userinfo') {
					let userinfo = that[err_type];
					userinfo.photo = err_img;
					_this.userinfo = userinfo
				} else if (err_type == 'wxCode') {
					let appConfig = that['appConfig'];
					appConfig.cfg_weixinQr = err_img;
					_this.appConfig = appConfig
				}
			},

			// 获取订单信息
			getOrderInfo(orderData) {
				const that = this;
				// let orderData = that.pageSet.orderData;
				// console.log(orderData);
				if (orderData && orderData.indexOf('all') > -1) {
					orderData.splice(orderData.indexOf('all'), 1);
				}
				let userid = uni.getStorageSync('userid');
				if (!userid) {
					return false;
				} //没有获取用户id
				let dataParam = 'service=member&action=getModuleOrderCount&need_data=' + (orderData ? orderData.join(',') :
					'');
				let urlData = app.encodeUrl(dataParam);
				_this.$ajax.post({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						_this.orderInfo = data.info
					}
				})
			},

			// 显示隐藏
			changeWxPop(e) {
				const that = this;
				let type = e.currentTarget.dataset.type;
				_this.wxGz = type === '1' ? false : true
			},

			// RGB转换为16进制
			setRgbTo16(str) {
				let reg = /^(rgb|RGB)/;
				if (!reg.test(str)) {
					return;
				}
				var arr = str.slice(4, str.length - 1).split(',');
				let color = '#';
				for (var i = 0; i < arr.length; i++) {
					var t = Number(arr[i]).toString(16);
					if (t == '0') {
						//如果为“0”的话，需要补0操作,否则只有5位数
						t = t + '0';
					}
					color += t;
				}
				return color;
			},

			//是否浅色
			isLight(rgb = [0, 0, 0]) {
				return 0.213 * rgb[0] + 0.715 * rgb[1] + 0.072 * rgb[2] > 127.5;
			},

			// 16进制转换为RGB
			set16ToRgb(str) {
				var reg = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;
				if (!reg.test(str)) {
					return;
				}
				let newStr = str.toLowerCase().replace(/\#/g, '');
				let len = newStr.length;
				if (len == 3) {
					let t = '';
					for (var i = 0; i < len; i++) {
						t += newStr.slice(i, i + 1).concat(newStr.slice(i, i + 1));
					}
					newStr = t;
				}
				let arr = []; //将字符串分隔，两个两个的分隔
				for (var i = 0; i < 6; i = i + 2) {
					let s = newStr.slice(i, i + 2);
					arr.push(parseInt('0x' + s));
				}
				return 'rgb(' + arr.join(',') + ')';
			},

			// RGB转换为16进制
			setRgbTo16(str) {
				let reg = /^(rgb|RGB)/;
				if (!reg.test(str)) {
					return;
				}
				var arr = str.slice(4, str.length - 1).split(',');
				let color = '#';
				for (var i = 0; i < arr.length; i++) {
					var t = Number(arr[i]).toString(16);
					if (t == '0') {
						//如果为“0”的话，需要补0操作,否则只有5位数
						t = t + '0';
					}
					color += t;
				}
				return color;
			},

			// 获取图片主色
			setBackgroundColor(imageSrc, index) {
				const that = this;
				const query = uni.createSelectorQuery();
				query
					.select('#myCanvas')
					.fields({
						node: true,
						size: true
					})
					.exec((res) => {
						const canvas = res[0].node;
						const ctx = canvas.getContext('2d');
						uni.getImageInfo({
							src: imageSrc,
							success: function(res) {
								const poster = res.path;
								let image = canvas.createImage();
								image.onload = function() {
									ctx.drawImage(image, 0, 0, 300, 150);
								};
								image.src = poster;
								uni.canvasToTempFilePath({
									x: 0,
									y: 0,
									width: 300,
									height: 150,
									destWidth: 300,
									destHeight: 150,
									canvas: canvas,
									success(res) {
										let tempPath = res.tempFilePath;
										const imageData = ctx.getImageData(0, 0, 300, 150);
										// 分区块，可以拓展性的求主要色板，用来做palette
										// let resImageObj = getColor.getMainColor(imageData.data);
										// const { defaultRGB } = resImageObj;
										// const { r, g, b } = defaultRGB;
										// // 图片主色
										// let bgColor = `${r}, ${g}, ${b}`;
										// uni.setNavigationBarColor({
										//     frontColor: that.isLight(bgColor.split(',')) || (!r && !g && !b) ? '#000000' : '#ffffff',
										//     backgroundColor: '#ffffff'
										// });
										// that.setData({
										//     bgColor: that.isLight(bgColor.split(',')) ? '#000000' : '#ffffff'
										// });
									},
									fail() {
										// console.log('222222');
										throw new Error();
									}
								});
							},
							fail(err) {
								console.log(err, '3333');
							}
						});
					});
			},
			// 查看是否过期
			checkVipLevel(userinfo) {
				var now = parseInt(new Date().getTime() / 1000)
				var expired = userinfo.expired;
				return expired > now ? userinfo.level : 0
			},

			//转换PHP时间戳
			transTimes(timestamp, n) {
				// update = new Date(timestamp * 1000);//时间戳要乘1000

				const dateFormatter = app.dateFormatter(timestamp);
				const year = dateFormatter.year;
				const month = dateFormatter.month ;
				const day = dateFormatter.day;
				const hour = dateFormatter.hour;
				const minute = dateFormatter.minute;
				const second = dateFormatter.second;
				if (n == 1) {
					return (year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second);
				} else if (n == 2) {
					return (year + '/' + month + '/' + day);
				} else if (n == 3) {
					return (month + '/' + day);
				} else {
					return 0;
				}
			},
			checkVipLevelText(userinfo) {
				var showText = ''
				if (userinfo.level == '0' || !this.checkVipLevel(userinfo)) { //非会员或者已过期
					showText = '';
				} else {
					var now = parseInt(new Date().getTime() / 1000)
					if (now > userinfo.expired) { //已过期
						var day = parseInt((now - userinfo.expired) / 86400);
						showText = userinfo.levelName + '已过期' + (day < 1 ? '' : day + '天')

					} else {
						showText = '权益到期：' + this.transTimes(userinfo.expired, 2)
					}
				}
				return showText;
			},

			// 验证是否选中
			checkArr(showItems, objArr, ind, type) {
				var realChose = [];
				// if(type == 'order'){
				//     for(var i = 0; i < showItems.length; i++ ){
				//         var obj = objArr.find(function(item){
				//             console.log(JSON.stringify(item));
				//             return item.id == showItems[i]
				//         });
				//         realChose.push(obj)
				//     }
				// }else{
				if (ind && ind === '1' && type != 'order') { //正在上架中
					var newArr = showItems.filter(function(item) {
						return [1, 2, 3].indexOf(item) <= -1;
					})
					showItems = JSON.parse(JSON.stringify(newArr))
				}
				realChose = objArr.filter(function(item) {
					return showItems.indexOf(item.id) > -1;
				})

				// }
				return realChose
			},

			// 背景色和透明度转换
			checkBgColor(bgColor, opc) {
				opc = opc || opc === '0' ? opc : 100;
				var opacity = (opc / 100).toFixed(2);
				var alphaHexMap = {
					'1.00': 'FF',
					'0.99': 'FC',
					'0.98': 'FA',
					'0.97': 'F7',
					'0.96': 'F5',
					'0.95': 'F2',
					'0.94': 'F0',
					'0.93': 'ED',
					'0.92': 'EB',
					'0.91': 'E8',
					'0.90': 'E6',
					'0.89': 'E3',
					'0.88': 'E0',
					'0.87': 'DE',
					'0.86': 'DB',
					'0.85': 'D9',
					'0.84': 'D6',
					'0.83': 'D4',
					'0.82': 'D1',
					'0.81': 'CF',
					'0.80': 'CC',
					'0.79': 'C9',
					'0.78': 'C7',
					'0.77': 'C4',
					'0.76': 'C2',
					'0.75': 'BF',
					'0.74': 'BD',
					'0.73': 'BA',
					'0.72': 'B8',
					'0.71': 'B5',
					'0.70': 'B3',
					'0.69': 'B0',
					'0.68': 'AD',
					'0.67': 'AB',
					'0.66': 'A8',
					'0.65': 'A6',
					'0.64': 'A3',
					'0.63': 'A1',
					'0.62': '9E',
					'0.61': '9C',
					'0.60': '99',
					'0.59': '96',
					'0.58': '94',
					'0.57': '91',
					'0.56': '8F',
					'0.55': '8C',
					'0.54': '8A',
					'0.53': '87',
					'0.52': '85',
					'0.51': '82',
					'0.50': '80',
					'0.49': '7D',
					'0.48': '7A',
					'0.47': '78',
					'0.46': '75',
					'0.45': '73',
					'0.44': '70',
					'0.43': '6E',
					'0.42': '6B',
					'0.41': '69',
					'0.40': '66',
					'0.39': '63',
					'0.38': '61',
					'0.37': '5E',
					'0.36': '5C',
					'0.35': '59',
					'0.34': '57',
					'0.33': '54',
					'0.32': '52',
					'0.31': '4F',
					'0.30': '4D',
					'0.29': '4A',
					'0.28': '47',
					'0.27': '45',
					'0.26': '42',
					'0.25': '40',
					'0.24': '3D',
					'0.23': '3B',
					'0.22': '38',
					'0.21': '36',
					'0.20': '33',
					'0.19': '30',
					'0.18': '2E',
					'0.17': '2B',
					'0.16': '29',
					'0.15': '26',
					'0.14': '24',
					'0.13': '21',
					'0.12': '1F',
					'0.11': '1C',
					'0.10': '1A',
					'0.09': '17',
					'0.08': '14',
					'0.07': '12',
					'0.06': '0F',
					'0.05': '0D',
					'0.04': '0A',
					'0.03': '08',
					'0.02': '05',
					'0.01': '03',
					'0.00': '00',
				}

				var color = bgColor + alphaHexMap[opacity]; //转换之后的色值
				return color
			},

			// 加上rpx
			toRPX(px) {
				return px + 'rpx'
			},

			// 判断字符串或数组是否包含
			hasIn(val, ival) {
				var inner = false;
				if (val && ival) {
					inner = val.indexOf(ival) > -1
				}
				return inner;
			},

			// 计算样式
			getStyle(box, type, content) {
				var styleStrArr = [];
				if (!content) return false;
				if (box == 'memberBg') {
					// console.log(content);
					// 背景色
					if (content.bgType != 'image') {
						styleStrArr.push('background:' + content.style.bg_color)
					} else {
						styleStrArr.push('background-image:url(' + content.style.bg_image + ')')
					}
				} else if (box == 'numberCountBox') {
					// 边距
					styleStrArr.push('margin:' + _this.toRPX(content.cardStyle.marginTop) + ' 0  0')

					// 背景色
					styleStrArr.push('background:' + (content.numberCount.style.background ? _this.checkBgColor(content
						.numberCount
						.style.background, content.numberCount.style.opacity) : 'transparent'))

					// 边框
					styleStrArr.push('border-style:solid')
					styleStrArr.push('border-color:' + (content.numberCount.style.borderColor ? content.numberCount
						.style
						.borderColor : 'transparent'))
					styleStrArr.push('border-width:' + _this.toRPX(content.numberCount.style.borderSize))
					// 圆角
					styleStrArr.push('border-radius:' + _this.toRPX(content.cardStyle.borderRadius))
				} else if (box == 'vipCardBox') {
					if (content.vipCard.theme === 3) {
						if (type == 'inner') {
							// 背景色
							if (content.vipCard.style.bgType != 'image') {
								styleStrArr.push('background:' + (content.vipCard.style.background ? content.vipCard
									.style
									.background : content.vipCard.style.initBackground))
							} else {
								styleStrArr.push('background-image:url(' + content.vipCard.style.backimg + ')')
							}
							// 圆角
							styleStrArr.push('border-radius:' + _this.toRPX(content.cardStyle.borderRadius))
						} else {

							styleStrArr.push('border-radius:' + _this.toRPX(content.cardStyle.borderRadius))
							styleStrArr.push('background:' + content.financeCount.style.background)
						}
					} else {

						// 边距
						if (content.vipCard.style.bgType != 'image') {
							styleStrArr.push('background:' + (content.vipCard.style.background ? content.vipCard.style
								.background : content.vipCard.style.initBackground))
						} else {
							styleStrArr.push('background-image:url(' + content.vipCard.style.backimg + ')')
						}
						// 圆角
						styleStrArr.push('border-radius:' + _this.toRPX(content.cardStyle.borderRadius))
					}

					if (type == 'margin') {
						styleStrArr = ['margin-top:' + _this.toRPX(content.cardStyle.marginTop)]
					}
					if (type == 'radius') {
						styleStrArr = ['border-radius:' + _this.toRPX(content.cardStyle.borderRadius)]
					}

				} else if (box == 'vipCardBtn') {
					if (content.vipCard.btnStyle.styleType == 'radius') {
						// 背景色
						styleStrArr.push('background:' + content.vipCard.btnStyle.style.background)
						styleStrArr.push('color:' + content.vipCard.btnStyle.style.color)
						// 圆角
						styleStrArr.push('border-radius:' + _this.toRPX(content.vipCard.btnStyle.style.borderRadius));
					} else {
						styleStrArr.push('color:' + content.vipCard.btnStyle.style.background)
					}
				} else if (box === 'vipCardBtnArr') { //箭头样式
					if (content.vipCard.btnStyle.styleType == 'radius') {

						styleStrArr.push('filter: drop-shadow(18rpx 0 0 ' + content.vipCard.btnStyle.style.color +
							') ')
					} else {
						styleStrArr.push('filter: drop-shadow(18rpx 0 0 ' + content.vipCard.btnStyle.style.background +
							') ')

					}
				} else if (box == 'orderInfoBox' || box == 'financeInfoBox' || box == 'iconsInfoBox' || box ==
					'listInfoBox' ||
					box == 'wechatInfo') {
					styleStrArr.push('margin: ' + _this.toRPX(content.style.marginTop) + ' ' + _this.toRPX(content.style
							.marginLeft) +
						'  0'); //边距
					styleStrArr.push('border-radius:' + _this.toRPX(content.style.borderRadius))
					if (box == 'financeInfoBox') {
						if (content.bgType == 'color') {
							styleStrArr.push('background-color:' + content.style.bg_color)
						} else {
							styleStrArr.push('background:url(' + content.style.bg_image + ') no-repeat center/cover')
						}
					} else if ((box == 'wechatInfo' && content.custom)) {
						styleStrArr.push('height:' + _this.toRPX(content.style.height));
					}
				} else if (box == 'titleInfo') {
					styleStrArr.push('margin: 0 ' + _this.toRPX(content.style.marginLeft)); //边距
					styleStrArr.push('height:' + _this.toRPX(content.style.height));

				} else if (box == 'finance_number') {
					styleStrArr.push('margin: 0 ' + _this.toRPX(content.style.marginLeft)); //边距
					styleStrArr.push('height:' + _this.toRPX(content.style.height));
				} else if (box == 'financeInfo') {
					styleStrArr.push('color:' + content.financeCount.titleStyle.color)
					if (!type) {

						styleStrArr.push('width:' + (100 / (content.financeCount.showItems.length > 1 ? content
							.financeCount
							.showItems.length : 2)) + '%;')
					}
				} else if (box == 'pageTop') {
					styleStrArr.push('margin:0 ' + this.toRPX(content.style.marginLeft)); //边距
				} else if (box == 'pageBtn') {

					if (content.btns.style.color && content.btns.style.color != 'transparent' && content.btns
						.showType === 0) {
						styleStrArr.push('transform: translateX(-100%); filter: drop-shadow(44rpx 0 0 ' + content.btns
							.style
							.color + ')');
					} else {
						styleStrArr.push('transform: translateX(0);');
					}
				}
				return styleStrArr.join(';');
			},

			numberDot(num) {
				return (num ? num : 0).toString().split('.')
			},


			encodeUrl(url, memberUrl) {
				// url = memberUrl ? memberUrl + url : url;
				var lastUrl = '/pages/redirect/index?url=' + encodeURIComponent(url)
				return lastUrl
			},

			toSvg(src) {
				// if(src.indexOf('/static/images/admin/') > -1){
				//     src = src.replace('.png','.svg')
				// }
				// var link = src;
				var imgName = src.split('/')[src.split('/').length - 1]
				let newSrc = imgName.replace('.png', '.svg')
				// console.log(newSrc);
				return newSrc
			},

			NumberFomart(num) {

				if (num > 10000) {
					num = parseFloat((num / 10000).toFixed(2));
					num = num + 'w'
				}
				return num
			},

			// 监听获取设备信息
			checkiOSMini() {
				const _this = this;

				_this.iosMiniHide = app.globalData.iOSMiniPay_forbid; //ios端需要隐藏支付
				if (!app.globalData.appConfig) { //未获取到appConfig
					app.essentialData(function(data) {
						_this.iosMiniHide = data.iOSMiniPay_forbid; //禁止
					})
				}
			},

			// 显示弹窗
			showiOSPayMsg() {
				const _this = this;
				uni.showModal({
					title: '温馨提示',
					content: app.globalData.iosMiniPay_msg,
					showCancel: false, //隐藏取消按钮
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						}
					},

				})
			},

			backToIndex(){
				const that = this;
				if(that.uniPlatform == 'web'){
					if(!that.appBoolean){
						window.location.href = that.masterDomain ? that.masterDomain  : app.globalData.masterDomain
					}else{ //app调返回上一页
						window.setupWebViewJavascriptBridge(function (bridge) {
							bridge.callHandler("goBack", {}, function (responseData) { });
						})
					}
				}else{
					uni.reLaunch({
						url:'/pages/index/index'
					});
				}
			},

			touchStartMove(){
				const that = this;
				if(that.previewBtn && that.preview){
					that.previewBtn = false;
				}
			},

			touchEndMove(){
				const that = this;
				setTimeout(() => {
					if(!that.previewBtn && that.preview){
						that.previewBtn = true
					}
				}, 2000);
			},

			// 清除空元素
			removeEmpty(list,type){
				const that = this;
				let listCon = list.filter(item => {
					return (item.link || item.icon)
				});
				
				return listCon;
			},

			// 验证是否为空
			checkEmpty(list,column){
				const that = this;
				let empty = [];
				let listCon = list.filter(item => {
					return item.image
				})
				if(column == 1){
					empty = listCon && listCon.length ? listCon : []
				}else{
					empty = list
				}
				return empty
			},
			// 跳转链接
			goLink(url, login = false,  redirect = false){
				const that = this;
				if (login && !app.loginCheck(url)) { //登录验证
					return false
				}
				
				if(url == this.businessUrl){
					if(that.userinfo.is_staff == 1){
						url = that.memberComp.branch.link;
					}else if(that.globalData.appConfig.cfg_busiCenterDiy == 1){
						url = '/pages/packages/company/index/index'
						redirect = 1;
					}
					
				}
				app.linkTo(url, redirect, false);
			},

			// islogin 表示是否验证登录
			toLink(obj,islogin){
				const that = this;
				let redirect = 0;
				if(islogin){
					var pages_arr = getCurrentPages() // 获取栈实例
					let currentRoute = pages_arr[pages_arr.length - 1].route; // 获取当前页面路由
					let currentPage = pages_arr[pages_arr.length - 1]['$page']['fullPath'] //当前页面路径(带参数)
					let bool = app.loginCheck(currentPage,true)
					if(!bool) return false
				}
				if (obj.linkInfo && obj.linkInfo.linkText == '切换商家版' && app.globalData.appConfig
					.cfg_busiCenterDiy == 1) {
					obj.link = '/pages/packages/company/index/index'
					redirect = 1
				}else {
					if( (obj.mini || (obj.linkInfo && obj.linkInfo.mini)) && obj.linkInfo.linkText != '切换商家版'  && ['mp-weixin','mp-toutiao'].includes(that.platForm)){
						obj.link = obj.mini || (obj.linkInfo && obj.linkInfo.mini)
					}
				}
				if(obj.linkInfo && obj.linkInfo.linkText && obj.link.includes('/29/')){
					obj.link = obj.link.replace('/29/',`/${that.userinfo.userid}/`)
				}
				if(obj.linkInfo){
					obj.linkInfo.type = (obj.linkInfo.selfSetTel ? 4 : 1); //跳转类型 -- 默认链接
				}
				app.diyLinkTo(obj,redirect,true); // obj.link 改为obj 是为了避免多次diyLinkTo多次判断链接类型
			}
		}
	};
</script>
<style>
	@import './index.css';
</style>